import fetch from 'fetch'

export default {
  // 销售首页统计信息
  saleDataStatistics (params) {
    return fetch({
      url: '/v1/user/train/sale/saleDataStatistics',
      params
    })
  },
  // custom页
  // 查询该销售员可选的校区
  getCampusList (params) {
    return fetch({
      url: '/v1/user/train/sales/getCampusList',
      params
    })
  },
  // 查询可选省市
  getDictAreaTree (params) {
    return fetch({
      url: '/v1/dict/getDictAreaTree',
      params
    })
  },
  // 添加客户
  addStudent (data) {
    return fetch({
      url: '/v1/user/train/sales/addStudent',
      method: 'post',
      data
    })
  },
  // 客户列表
  getSalespersonStudentList (params) {
    return fetch({
      url: '/v1/user/train/sales/getSalespersonStudentList',
      params
    })
  },
  // /detail/学生id及其子页面-获取学生信息
  getSaleStudent (params) {
    return fetch({
      url: '/v1/user/train/sales/getSaleStudent',
      params
    })
  },
  // 获取跟进记录-带分页
  getFollowRecordList (params) {
    return fetch({
      url: '/v1/user/train/sales/getFollowRecordList',
      params
    })
  },
  // 获取试课记录-带分页
  getStudentTestClassList (params) {
    return fetch({
      url: '/v1/user/train/sales/getStudentTestClassList',
      params
    })
  },
  // 修改学员状态
  updateSaleStudentStatus (params) {
    return fetch({
      url: '/v1/user/train/sales/updateSaleStudentStatus',
      method: 'put',
      params
    })
  },
  // 输入跟进记录
  addFollowRecord (data) {
    return fetch({
      url: '/v1/user/train/sales/addFollowRecord',
      method: 'post',
      data
    })
  },
  // 查询可以办理报名的那些课程
  getCourseFormList (params) {
    return fetch({
      url: '/v1/user/train/sales/getCourseFormList',
      params
    })
  },
  // 办理报名
  applyRegistration (data) {
    return fetch({
      url: '/v1/user/train/sales/applyRegistration',
      method: 'post',
      data
    })
  },
  // 添加试课
  addStudentToTestClass (data) {
    return fetch({
      url: '/v1/user/train/sales/addStudentToTestClass',
      method: 'post',
      data
    })
  }
}
